import request from '@/utils/request'

// 获取视频列表
export function ReportByList(params) {
  return request({
    url: '/report/ReportByList',
    method: 'get',
    params,
  })
}
export function SendActions(list) {
  return request({
    url: '/api/tspet/openseries',
    method: 'post',
    data: list,
  })
}
// 获取报告所有的报告中心
export function patientInfoList(params) {
  return request({
    url: `report/studentReportListPage?pageNum=${params.pageNum}&pageSize=${params.pageSize}`,
    method: 'post',
    data: params,
  })
}

// 检查项目下拉框
export function getDropDownCheckName(data) {
  return request({
    url: '/report/teacher/getDropDownCheckName ',
    method: 'get',
    data,
  })
}

// 对比
export function getCompareData(reportId) {
  return request({
    url: 'report/getCompareData/' + reportId,
    method: 'get',
  })
}
export function getEquipment() {
  return request({
    url: '/student/getEquipment',
    method: 'get',
  })
}
// 检查状态下拉框
export function getDropDownState(data) {
  return request({
    url: '/report/teacher/getDropDownState',
    method: 'get',
    data,
  })
}
//我的报告
export function getCompleteStatus(data) {
  return request({
    url: '/report/teacher/completeStatus',
    method: 'get',
    data,
  })
}

//病史请求记录地址
export function getSurvey(reportId) {
  return request({
    url: '/report/getBgReadyTxt/' + reportId,
    method: 'get',
  })
}
//随访记录请求地址
export function getBgReadyTxt(reportId) {
  return request({
    url: '/report/getSurvey/' + reportId,
    method: 'get',
  })
}
//检查所见请求地址
export function getCheckSee(reportId) {
  return request({
    url: '/report/getCheckSee/' + reportId,
    method: 'get',
  })
}
//检查意见请求地址
export function getCheckOpinion(reportId) {
  return request({
    url: '/report/getCheckOpinion/' + reportId,
    method: 'get',
  })
}

// 获取报告中心编辑
export function studentReportInfo(reportId) {
  return request({
    url: '/report/studentReportInfo/' + reportId,
    method: 'get',
  })
}
//127.0.0.1:8080/api
//报告中心---序列
export function getSequence(reportId) {
  return request({
    url: `/api/tspet/getStudyInsta/${reportId}`,
    method: 'get',
  })
}

//报告中心---截图
export function getImages(studyInsta) {
  return request({
    url: `/api/tspet/images/?StudyInsta=${studyInsta}`,
    method: 'get',
  })
}

// 学生编写检查报告/保存 用于学生写到一半保存写的进度
export function getSaveEdit(datas) {
  return request({
    url: '/report/save/report',
    method: 'post',
    data: datas,
  })
}

//学生编写检查报告/提交 用于学生提交报告作业
export function getUpdateEdit(data) {
  return request({
    url: '/report/update/report',
    method: 'post',
    data,
  })
}

// 编辑-获取树形节点
export function templateData() {
  return request({
    url: 'report/teacher/template',
    method: 'get',
  })
}

export function templateInfo(id, parentId) {
  return request({
    url: `report/teacher/templateInfo/${id}/${parentId}`,
    method: 'get',
  })
}
